package com.weijianhuawen.wjblog.common.exception;

import com.weijianhuawen.wjblog.common.enums.ResponseCodeEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * @version: java version 8
 * @Author: weijianhuawen
 * @description: 业务异常
 * @date: 2024-10-19 23:31
 */
@Getter
@Setter
public class BizException extends RuntimeException{
    //异常码
    private String exceptionCode;
    //异常信息
    private String exceptionMessage;

    public BizException(BaseExceptionInterface baseExceptionInterface) {
        this.exceptionCode = baseExceptionInterface.getErrorCode();
        this.exceptionMessage = baseExceptionInterface.getErrorMessage();
    }
}
